<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'info.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css" href="commons/css/button.css" />
		<link rel="stylesheet" type="text/css" href="commons/css/form.css" />
		<script type="text/javascript" src="commons/js/form.js"></script>
		<script type="text/javascript" src="commons/jquery/jquery.js"></script>
		<style>
			.error{
				box-shadow: 0px 0px 5px #F00;
				background-color: #FFFEEF;
			}
		</style>		
		
	</head>
	<body>
		<div class="container" align="center">
			<div class='companyWap'>
				<table class='details'>
					<tr>
						<td>
							新增个人基本信息： 
						</td>
					</tr>
				</table>
				<form action="emp!add.action" method="post" onsubmit="return validate();">
					<s:token></s:token>
					<table class='details'>
						<tr>
							<td class='n'>用户账号：</td>
							<td>
								<input type="text" name="no" onblur="checko(this.name);"/><span class="helpTip">(必填,登陆账号,全数字6位)</span>
							</td>
						<!-- </tr>
						<tr> -->
							<td class='n'>用户姓名：</td>
							<td>
								<input onblur="check(this.name);"  type="text" name="name"/><span class="helpTip">(必填,请填写真是姓名)</span>
							</td>
						</tr>
						<tr>
							<td class='n'>登录密码：</td>
							<td>
								<input onblur="checko(this.name);" type="text" name="password" value="123456"/><span class="helpTip">(必填,填写登录密码,默认123456)</span>
							</td>
						<!-- </tr>
						<tr> -->
							<td class='n'>联系电话：</td>
							<td>
								<input onblur="check(this.name);" type="text" name="telephone"/>${emp.telephone}<span class="helpTip">(必填,例如：18900000001)</span>
							</td>
						</tr>						
						<tr>
							<td class='n'>电子邮箱：</td>
							<td>
								<input onblur="check(this.name);" type="text" name="email"/>${emp.email}<span class="helpTip">(必填,例如：a@b.com)</span>
							</td>
						<!-- </tr>
						<tr> -->
							<td class='n'>工作职称：</td>
							<td>
								<input onblur="check(this.name);" type="text" name="job"/>${emp.job}<span class="helpTip">(必填,工作名称)</span>
							</td>
						</tr>
						<tr>
							<td class='n'>身份证号：</td>
							<td>
								<input onblur="check(this.name);" type="text" name="idcard"/>${emp.idcard}<span class="helpTip">(必填,16位或18位身份证号)</span>
							</td>
						<!-- </tr>
						<tr> -->
							<td class='n'>地址：</td>
							<td>
								<input onblur="check(this.name);" type="text" name="address"/>${emp.address}<span class="helpTip">(必填,联系地址)</span>
							</td>
						</tr>	
						<tr>
							<td class='n'>部门：</td>
							<td>
								<select name="department.id">
									<option value="">=请选择=</option>
									<c:forEach var="item" items="${departs}">
										<option value="${item.id}">${item.name}</option>
									</c:forEach>
								</select>
								${emp.department.name}
								<span class="helpTip">(必选,部门名称)</span>
							</td>
						<!-- </tr>
						<tr> -->
							<td class='n'>状态：</td>
							<td>
								<input type="radio" checked name="status" value="在职"/>在职 <input type="radio" name="status" value="离职"/>离职${emp.status}<span class="helpTip"> (必选,职工是否在职)</span>
							</td>
						</tr>						
						<tr>
							<td class='n'>政治面貌：</td>
							<td>
								<input type="text" name="politicalAffiliation"/>${emp.politicalAffiliation}<span></span>
							</td>
						<!-- </tr>
						<tr> -->
							<td class='n'>身高：</td>
							<td>
								<input type="text" name="stature"/>${emp.stature} cm<span></span>
							</td>
						</tr>	
						<tr>
							<td class='n'>年龄：</td>
							<td>
								<input type="text" name="age"/><span class="helpTip">(填写真实年龄)</span>
							</td>
						<!-- </tr>
						<tr> -->
							<td class='n'>邮编：</td>
							<td>
								<input type="text" name="postcode"/>${emp.postcode}<span class="helpTip">(例如:350100)</span>
							</td>
						</tr>	
						<tr>
							<td class='n'>学历：</td>
							<td>
								<input type="text" name="degree"/>${emp.degree}<span class="helpTip">(最高学历)</span>
							</td>
						<!-- </tr>
						<tr> -->
							<td class='n'>婚姻情况：</td>
							<td>
								<input type="radio" checked name="marriage" value="未婚"/>未婚 <input type="radio" name="marriage" value="已婚"/>已婚  ${emp.marriage}<span class="helpTip"></span>
							</td>
						</tr>
						<tr>
							<td class='n'>性别：</td>
							<td>
								<input  type="radio" name="sex" value="男" checked/>男 <input type="radio" name="sex" value="女"/>女<span class="helpTip"> (点击选择)</span>
							</td>
						<!-- </tr>
						<tr> -->
							<td class='n'>生日：</td>
							<td>
								<input type="text" name="birthday"/><fmt:formatDate pattern="yyyy年MM月dd日" value="${emp.birthday}"/><span class="helpTip">(例如:2012-01-01)</span>
							</td>
						</tr>
						<tr>
							<td class='n'>籍贯：</td>
							<td>
								<input type="text" name="nativePlace"/>${emp.nativePlace}<span class="helpTip"></span>
							</td>
						<!-- </tr>
						<tr> -->
							<td class='n'>民族：</td>
							<td>
								<input type="text" name="nation"/>${emp.nation}<span class="helpTip"></span>
							</td>
						</tr>
						<tr>
							<td class='n'>进公司时间：</td>
							<td>
								<input type="text" name="workTime"/>
							</td>
						<!-- </tr>
						<tr> -->
							<td class='n'>离开公司时间：</td>
							<td>
								-<input type="hidden" name="leaveTime"/><span class="helpTip"></span>
							</td>
						</tr>
						<tr >
							<td class='n'>备注：</td>
							<td colspan="3">
								<textarea rows="6" cols="90" name="remark"></textarea><span class="helpTip">(0-100个字符)</span>
							</td>
						</tr>
					</table>
					<div style="text-align: center; margin-top: 10px;">
						<button class="light" type="submit"> 提 交 </button>
					</div>
				</form>	
			</div>
		</div>
	</body>
</html>
